/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package designer;

import core.file.FileBroker;
import display.designer.RHD_MapDisplay;
import enviro.Dungeon;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;

/**
 *
 * @author timon
 */
public class RHD_StateManager {
    
    // <editor-fold defaultstate="collapsed" desc="Member Variables">
    // Hold the height and width of the dungeon in tile units.
    private static int currentDungeonHeight = 0;
    private static int currentDungeonWidth = 0;
    
    // Hold the dungeon's name and filepath
    private static String dungeonName = "";
    private static String dungeonPath = "";
    // </editor-fold>
    
    // <editor-fold defaultstate="collapsed" desc="Standard Get / Set">
    /**
     * Set the height of the dungeon currently in designer memory
     * 
     * @param height 
     *   The height, in tile units, of the current dungeon.
     */
    public static void setCurrentDungeonHeight(int height) {
        currentDungeonHeight = height;
    }
    
    /** 
     * Get the height of the dungeon currently in designer memory
     * 
     * @return 
     *   The height, in tile units, of the current dungeon.
     */
    public static int getCurrentDungeonHeight() {
        return currentDungeonHeight;
    }
    
    /**
     * Set the width of the dungeon currently in designer memory
     * 
     * @param
     *   The width, in tile units, of the current dungeon.
     */
     public static void setCurrentDungeonWidth(int width) {
         currentDungeonWidth = width; 
     }
     
    /**
      * Get the width of the dungeon currently in designer memory
      * 
      * @return 
      *   The width, in tile units, of the current dungeon.
      */
     public static int getCurrentDungeonWidth() {
         return currentDungeonWidth;
     }
     
     /**
      * Set the name of the current dungeon in memory
      * 
      * @param dungeonName
      *   The desired name of the current dungeon in memory.
      */
     public static void setDungeonName(String dungeonName) {
         dungeonName = dungeonName;
     }
     
     /**
      * Get the name of the current dungeon in memory
      * 
      * @return 
      *   The name of the current dungeon in memory
      */
     public static String getDungeonName(){
         return dungeonName;
     }
     
     /**
      * Set the filepath of the current dungeon in memory
      * 
      * @param dungeonFilePath
      *   The filepath of the dungeon in memory.
      */
     public static void setDungeonFilePath(String dungeonFilePath) {
         dungeonPath = dungeonFilePath;
     }
     
     /**
      * Get the filepath of the current dungeon in memory
      * 
      * @return 
      *   The filepath of the current dungeon in memory.
      */
     
      //</editor-fold>
     
    // <editor-fold defaultstate="collapsed" desc="API">
    public static void loadDungeon(File dungeonFile) throws FileNotFoundException, IOException, ClassNotFoundException {
        dungeonPath = dungeonFile.getPath();
        
        Dungeon dungeon = FileBroker.loadDungeon(dungeonPath);

    }
    
    // </editor-fold>
}
